// src/store/service/news.ts
import apiService from "@service/index";

const newsApiService = apiService
.injectEndpoints({
  endpoints: (builder) => ({
    // 获取新闻列表
    requestNews: builder.query<NewsResponse, NewsState>({
      query: (params) => ({ url: "/articles", params }),
    }),
  }),
});

export const { useLazyRequestNewsQuery } = newsApiService;